#include "scene3d.h"

Scene3D::Scene3D()
{
    drawer = new TreeRender();
    tree0 = new TreeGen2D();
    tree0->genTree();
    shadowGrid = new Shadow2D();
    shadowGrid3D = new Shadow3D();
    tree0->iterateShadowB(shadowGrid);

    tree3 = new TreeGen3D();
    tree3->genTree();
    tree3->stupidGen(tree3->treeRoot,0);

    shadowGrid3D->populateGrid(tree3->treeRoot);
    shadowGrid3D->queryQ(tree3->treeRoot);

}


Scene3D::~Scene3D(){
    delete drawer;
    delete tree0;
    delete shadowGrid;
    delete shadowGrid3D;
}

void Scene3D::draw(){
    shadowGrid3D->draw();
    drawer->drawTree(tree3);
    //drawer->drawTree(tree0);
}
